import store from '@/depends/store'

function userAuthority(Vue) {
  Vue.directive('authority', {
    inserted(el, binding, vnode) {
      if (store.state.user.userType == 1) {
        el.parentNode.removeChild(el)
      }
    }
  })
}


export default {
  install(Vue) {
    userAuthority(Vue);
  }
}